package cn.itlight.system.service.impl;

import cn.itlight.basic.service.impl.BaseServiceImpl;
import cn.itlight.system.domain.Dictionary;
import cn.itlight.system.domain.DictionaryDetail;
import cn.itlight.system.mapper.DictionaryDetailMapper;
import cn.itlight.system.mapper.DictionaryMapper;
import cn.itlight.system.service.IDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class DictionaryServiceImpl extends BaseServiceImpl<Dictionary> implements IDictionaryService {

    @Autowired
    private DictionaryMapper dictionaryMapper;
    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;

    @Override
    @Transactional
    public void remove(Long id) {
        dictionaryMapper.remove(id);
        dictionaryDetailMapper.removeByTid(id);

    }

}
